import request from '@/utils/request'

// 查询自动编码规则列表
export function listCodeRules(query) {
  return request({
    url: '/system/codeRules/list',
    method: 'get',
    params: query
  })
}

// 查询自动编码规则详细
export function getCodeRules(id) {
  return request({
    url: '/system/codeRules/' + id,
    method: 'get'
  })
}

// 新增自动编码规则
export function addCodeRules(data) {
  return request({
    url: '/system/codeRules',
    method: 'post',
    data: data
  })
}

// 修改自动编码规则
export function updateCodeRules(data) {
  return request({
    url: '/system/codeRules',
    method: 'put',
    data: data
  })
}

// 删除自动编码规则
export function delCodeRules(id) {
  return request({
    url: '/system/codeRules/' + id,
    method: 'delete'
  })
}

// 导出自动编码规则
export function exportCodeRules(query) {
  return request({
    url: '/system/codeRules/export',
    method: 'get',
    params: query
  })
}